<template>
  <div id="main">
    御剑乘风来,除魔天地间!==
  </div>
</template>

<script>
import * as echarts from 'echarts'

export default {
  name: '',
  mounted() {
    var chartDom = document.getElementById('main')
    var myChart = echarts.init(chartDom, 'dark')
    var option
    option = {
      title: {
        text: '基础雷达图'
      },
      legend: {
        data: []
      },
      radar: {
        // shape: 'circle',
        indicator: [
          { name: '工作效率', max: 100 },
          { name: '考勤', max: 100 },
          { name: '积极性', max: 100 },
          { name: '帮助同事', max: 100 },
          { name: '自主学习', max: 100 },
          { name: '正确率', max: 100 }
        ]
      },
      series: [
        {
          name: '预算 vs 开销（Budget vs spending）',
          type: 'radar',
          data: [
            {
              value: [10, 1, 100, 5, 100, 0],
              name: '张三'
            },
            {
              value: [50, 50, 50, 50, 50, 10],
              name: '李四'
            },
            {
              value: [100, 40, 50, 20, 40, 30],
              name: '王五'
            }
          ]
        }
      ]
    }
    option && myChart.setOption(option)
  }
}
</script>
<style lang="scss" scoped>
#main {
  width: 100%;
  height: 400px;
}
</style>
